Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 'local' to list of logging drivers that support docker-compose logs #7425

Merged
merged 2 commits into from
Aug 3, 2020

Conversation

svarogg
Copy link

@svarogg svarogg commented May 4, 2020

Resolves #7420

…ogs`

Signed-off-by: Mike Zak <feanorr@gmail.com>
Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM

ping @ulyssessouza PTAL

@@ -193,7 +193,7 @@ def log_driver(self):
@property
def has_api_logs(self):
log_type = self.log_driver
return not log_type or log_type in ('json-file', 'journald')
return not log_type or log_type in ('json-file', 'journald', 'local')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Slightly related; looks like the description here also needs updating;

"""A log stream can only be attached if the container uses a json-file

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the tip. Updated the comment.

Signed-off-by: Mike Zak <feanorr@gmail.com>
@audunsolemdal
Copy link

Will this also fix #7408 ?

@avkonst
Copy link

avkonst commented Jul 8, 2020

Hey, can this PR be merged and new compose version released with the fix?

Copy link
Member

@rumpl rumpl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@aiordache aiordache merged commit 05a5aae into docker:master Aug 3, 2020
@avkonst
Copy link

avkonst commented Aug 3, 2020

Thanks for the merge! Is there any information when it is going to be released in a new version?

@thaJeztah
Copy link
Member

Not sure when the next release will be (@rumpl may know if something is planned already).

Just a heads up; the next Docker (20.xx) release will include a feature called "dual logging" (docs: https://docs.docker.com/config/containers/logging/dual-logging/) that was previously only in the Enterprise Edition of the Docker Engine. That feature has been upstreamed (through moby/moby#40543). With that feature, the "local" logging driver can be always enabled, which means that the logs endpoint will always be able to read back logs from a buffer, irregardless of the logging driver that is used (which could be a logging plugin that sends logs to a remote logging aggregator)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

docker-compose logs doesn't work for local log driver
6 participants